﻿@model CandidateManager.Areas.Coach.Models.GroupModifyModel

@{
    ViewBag.Title = @Resources.Coach.CoachManage;
}

<h2>@Resources.Coach.CoachCreateGroup</h2>

@{Html.RenderPartial("CreateForm", Model.Group);}

@if (Model.Group.Id > 0)
{

    <table class="bordered">
        <tr>
            <td>
                <table class="bordered">

                    <thead>
                        <tr>
                            <th colspan="3">@Resources.Coach.CoachAllCandidates</th>
                        </tr>
                    </thead>

                    <tr>
                        <th class="Center column-detail">@Resources.Coach.CoachAdd</th>
                        <th class="vertical-header">@Resources.Coach.CoachCandidateId</th>
                        <th>@Resources.Coach.CoachCandidateFullName</th>
                    </tr>

                    @foreach (var candidate in Model.CandidatesList)
                    {
                        <tr>
                            <td class="Center column-detail">@Html.ActionLink(Resources.Coach.CoachAdd, "AddCandidate", "Groups", new { @candidateId = candidate.Id, @groupId = Model.Group.Id }, new { @class = "common-btn BlueColor" })</td>
                            <td>@Html.Label(candidate.Id.ToString())</td>
                            <td>@Html.Label(candidate.FullName)</td>
                        </tr>
                    }
                </table>
            </td>
            <td>
                <table class="bordered">
                    <thead>
                        <tr>
                            <th colspan="3">@Resources.Coach.CoachStudyGroupCandidates</th>
                        </tr>
                    </thead>

                    <tr>
                        <th class="Center column-detail">@Resources.Coach.CoachDelete</th>
                        <th class="vertical-header">@Resources.Coach.CoachCandidateId</th>
                        <th>@Resources.Coach.CoachCandidateFullName</th>
                    </tr>
                    @foreach (var addedcandidate in Model.GroupCandidates)
                    {
                        <tr>
                            <td class="Center column-detail">@Html.ActionLink(Resources.Coach.CoachDelete, "DeleteCandidate", new { @candidateId = addedcandidate.Id, @groupId = Model.Group.Id }, new { @class = "common-btn BlueColor" })</td>
                            <td>@Html.Label(addedcandidate.Id.ToString())</td>
                            <td>@Html.Label(addedcandidate.FullName)</td>
                        </tr>
                    }
                </table>
            </td>
        </tr>
    </table>
}
